package com.lhkj.ct.meta.modules.psychology.model.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * @Description : 统计分析传参类
 */
@Setter
@Getter
public class SampleAnalysisDto implements Serializable {

    @NotBlank(message = "量表id不能为空")
    @ApiModelProperty("量表id")
    private String scaleId;

    @NotEmpty(message = "请选择需要统计的报告")
    @Size(min = 2, message = "请至少选择两组或两组以上的分组")
    @ApiModelProperty("样本组合")
    @Valid
    private List<Combine> combines;

    @Setter
    @Getter
    public static class Combine {

        @NotBlank(message = "请输入组合名称")
        @ApiModelProperty("组合名称")
        private String combineName;

        @NotEmpty(message = "报告编号不能为空")
        @Size(min = 2, message = "选择的报告必须大于或等于二个！")
        @ApiModelProperty("报告id")
        private List<String> reportIds;
    }
}
